package com.ruoyi.kq.scheduler;

import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import com.ruoyi.kq.domain.WorkRecord;
import com.ruoyi.kq.mapper.WorkRecordMapper;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * 文件名称: 下班
 * 功能描述:
 * 创建时间: 2025/3/17 17:41
 *
 * @author huangdelu
 */
@Component
public class TextMessageOffWorkTask {
    @Resource
    WorkRecordMapper workRecordMapper;

    public void excute() {
        //今天时间
        String today = DateUtil.today();
        List<WorkRecord> workRecords = workRecordMapper.selectEndTimeIsNo(today);
        if (CollectionUtil.isNotEmpty(workRecords)) {
            for (WorkRecord workRecord : workRecords) {
                String name = workRecord.getName();
                //发送短信
            }
        }

    }
}
